Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 2 - Geometric Shapes / Geometric Shapes Reference
Functions / Getting and Setting Shape Geometries


GXSetShapeVector

You can use the GXSetShapeVector function to change the geometry of an existing shape.

void GXSetShapeVector(gxShape target, const Fixed vector[]);
target
A reference to the shape whose geometry you want to change.
data
An array of fixed-point values to use as the new geometry.
DESCRIPTION
The GXSetShapeVector function replaces the geometry of the target shape with a new geometry, which it creates by traversing the vector array. The length of the vector array that you supply depends on shape type of the target shape; for example, if the target shape is a point, you should provide a vector array with two Fixed values; if the target shape is a line, you should provide four Fixed values, and so on.

Although this function creates a copy of the default shape, it does not create a copy of the default shape's style, ink, or transform. The new shape returned by this function contains references to same style, ink, and transform as the default shape. You can change the style using functions from Chapter 3, "Geometric Styles," and you can change the style, ink, and transform using functions from Inside Macintosh: QuickDraw GX Objects.

You may pass any number of values in the vector array; the GXNewShapeVector function traverses this array as necessary to initialize the new shape's geometry. If you pass too few values in this parameter, the function posts the warning extra_data_passed_was_ignored.

If you specify a shape type that is not one of the geometric shape types, this function performs the actions described in the following table:
Shape typeAction taken
bitmapSets the target shape to be a bitmap shape; expects the vector array to contain values corresponding to the fields of a bitmap structure
pictureSets the target shape to be a picture shape with no overriding styles, inks, or transforms; expects the vector array to contain an array of shape references
textPosts the error graphic_type_does_not_contain_points
glyphPosts the error graphic_type_does_not_contain_points
layoutPosts the error graphic_type_does_not_contain_points

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
parameter_is_nil 
number_of_points_exceeds_implementation_limit 
number_of_contours_exceeds_implementation_limit 
size_of_polygon_exceeds_implementation_limit 
size_of_path_exceeds_implementation_limit 
illegal_type_for_shape (debugging version)
count_is_less_than_one (debugging version)
shape_access_not_allowed (debugging version)
graphic_type_does_not_contain_points(debugging version)
Warnings 
extra_data_passed_was_ignored 
SEE ALSO
For general information about each type of geometry, see "About Geometric Shapes" on page 2-5. For specific definitions of each type of geometry, see the section "Data Types" beginning on page 2-104.

For information about related functions, see the descriptions of the GXSetPoint, GXSetLine, GXSetCurve, GXSetRectangle, GXSetPolygons, and GXSetPaths functions on page 2-122 through page 2-135.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help